package com.module.oa.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.module.oa.mapper.PerformancecriterionMapper;
import com.module.oa.domain.Performancecriterion;
import com.module.oa.service.IPerformancecriterionService;

/**
 * 绩效评分标准Service业务层处理
 * 
 * @author hezhengxian
 * @date 2023-09-08
 */
@Service
public class PerformancecriterionServiceImpl implements IPerformancecriterionService 
{
    @Autowired
    private PerformancecriterionMapper performancecriterionMapper;

    /**
     * 查询绩效评分标准
     * 
     * @param criterionId 绩效评分标准主键
     * @return 绩效评分标准
     */
    @Override
    public Performancecriterion selectPerformancecriterionByCriterionId(Integer criterionId)
    {
        return performancecriterionMapper.selectPerformancecriterionByCriterionId(criterionId);
    }

    /**
     * 查询绩效评分标准列表
     * 
     * @param performancecriterion 绩效评分标准
     * @return 绩效评分标准
     */
    @Override
    public List<Performancecriterion> selectPerformancecriterionList(Performancecriterion performancecriterion)
    {
        return performancecriterionMapper.selectPerformancecriterionList(performancecriterion);
    }

    /**
     * 新增绩效评分标准
     * 
     * @param performancecriterion 绩效评分标准
     * @return 结果
     */
    @Override
    public int insertPerformancecriterion(Performancecriterion performancecriterion)
    {
        performancecriterion.setCreateTime(DateUtils.getNowDate());
        return performancecriterionMapper.insertPerformancecriterion(performancecriterion);
    }

    /**
     * 修改绩效评分标准
     * 
     * @param performancecriterion 绩效评分标准
     * @return 结果
     */
    @Override
    public int updatePerformancecriterion(Performancecriterion performancecriterion)
    {
        performancecriterion.setUpdateTime(DateUtils.getNowDate());
        return performancecriterionMapper.updatePerformancecriterion(performancecriterion);
    }

    /**
     * 批量删除绩效评分标准
     * 
     * @param criterionIds 需要删除的绩效评分标准主键
     * @return 结果
     */
    @Override
    public int deletePerformancecriterionByCriterionIds(Integer[] criterionIds)
    {
        return performancecriterionMapper.deletePerformancecriterionByCriterionIds(criterionIds);
    }

    /**
     * 删除绩效评分标准信息
     * 
     * @param criterionId 绩效评分标准主键
     * @return 结果
     */
    @Override
    public int deletePerformancecriterionByCriterionId(Integer criterionId)
    {
        return performancecriterionMapper.deletePerformancecriterionByCriterionId(criterionId);
    }
}
